<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QxOrm: C:/Dvlp/_Perso/QxOrm/include/QxDao/QxDaoPointer.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo_qxorm.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QxOrm
   &#160;<span id="projectnumber">1.4.3</span>
   </div>
   <div id="projectbrief">C++ Object Relational Mapping library</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_qx_dao_pointer_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">QxDaoPointer.h</div>  </div>
</div>
<div class="contents">
<a href="_qx_dao_pointer_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/****************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment">**</span>
<a name="l00003"></a>00003 <span class="comment">** http://www.qxorm.com/</span>
<a name="l00004"></a>00004 <span class="comment">** Copyright (C) 2013 Lionel Marty (contact@qxorm.com)</span>
<a name="l00005"></a>00005 <span class="comment">**</span>
<a name="l00006"></a>00006 <span class="comment">** This file is part of the QxOrm library</span>
<a name="l00007"></a>00007 <span class="comment">**</span>
<a name="l00008"></a>00008 <span class="comment">** This software is provided &#39;as-is&#39;, without any express or implied</span>
<a name="l00009"></a>00009 <span class="comment">** warranty. In no event will the authors be held liable for any</span>
<a name="l00010"></a>00010 <span class="comment">** damages arising from the use of this software</span>
<a name="l00011"></a>00011 <span class="comment">**</span>
<a name="l00012"></a>00012 <span class="comment">** Commercial Usage</span>
<a name="l00013"></a>00013 <span class="comment">** Licensees holding valid commercial QxOrm licenses may use this file in</span>
<a name="l00014"></a>00014 <span class="comment">** accordance with the commercial license agreement provided with the</span>
<a name="l00015"></a>00015 <span class="comment">** Software or, alternatively, in accordance with the terms contained in</span>
<a name="l00016"></a>00016 <span class="comment">** a written agreement between you and Lionel Marty</span>
<a name="l00017"></a>00017 <span class="comment">**</span>
<a name="l00018"></a>00018 <span class="comment">** GNU General Public License Usage</span>
<a name="l00019"></a>00019 <span class="comment">** Alternatively, this file may be used under the terms of the GNU</span>
<a name="l00020"></a>00020 <span class="comment">** General Public License version 3.0 as published by the Free Software</span>
<a name="l00021"></a>00021 <span class="comment">** Foundation and appearing in the file &#39;license.gpl3.txt&#39; included in the</span>
<a name="l00022"></a>00022 <span class="comment">** packaging of this file. Please review the following information to</span>
<a name="l00023"></a>00023 <span class="comment">** ensure the GNU General Public License version 3.0 requirements will be</span>
<a name="l00024"></a>00024 <span class="comment">** met : http://www.gnu.org/copyleft/gpl.html</span>
<a name="l00025"></a>00025 <span class="comment">**</span>
<a name="l00026"></a>00026 <span class="comment">** If you are unsure which license is appropriate for your use, or</span>
<a name="l00027"></a>00027 <span class="comment">** if you have questions regarding the use of this file, please contact :</span>
<a name="l00028"></a>00028 <span class="comment">** contact@qxorm.com</span>
<a name="l00029"></a>00029 <span class="comment">**</span>
<a name="l00030"></a>00030 <span class="comment">****************************************************************************/</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="preprocessor">#ifndef _QX_DAO_POINTER_H_</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define _QX_DAO_POINTER_H_</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#pragma once</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &lt;QtCore/qsharedpointer.h&gt;</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;QtCore/qstringlist.h&gt;</span>
<a name="l00048"></a>00048 <span class="preprocessor">#include &lt;QtCore/qdatastream.h&gt;</span>
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="preprocessor">#include &lt;<a class="code" href="_qx_serialize_q_data_stream___q_shared_pointer_8h.html" title="Provide a Qt QDataStream serialization method (save/load) for type QSharedPointer&lt;T&gt;">QxSerialize/QDataStream/QxSerializeQDataStream_QSharedPointer.h</a>&gt;</span>
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 <span class="keyword">namespace </span>qx {
<a name="l00053"></a>00053 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; QSharedPointer&lt;T&gt; <a class="code" href="group___qx_serialize.html#ga2a480297e6901b648482cc11524fdca7" title="qx::clone_to_qt_shared_ptr(const T &amp; obj) : return a Qt smart-pointer (QSharedPointer&lt;T&gt;) of a new in...">clone_to_qt_shared_ptr</a>(<span class="keyword">const</span> T &amp; obj);
<a name="l00054"></a>00054 } <span class="comment">// namespace qx</span>
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 <span class="keyword">namespace </span>qx {
<a name="l00057"></a>00057 <span class="keyword">namespace </span>dao {
<a name="l00058"></a>00058 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="keyword">class </span>ptr;
<a name="l00059"></a>00059 } <span class="comment">// namespace dao</span>
<a name="l00060"></a>00060 } <span class="comment">// namespace qx</span>
<a name="l00061"></a>00061 
<a name="l00062"></a>00062 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; QDataStream &amp; operator&lt;&lt; (QDataStream &amp; stream, const qx::dao::ptr&lt;T&gt; &amp; t);
<a name="l00063"></a>00063 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; QDataStream &amp; <a class="code" href="_qx_bool_8h.html#a01172f4bf3386f123bdcfd8b260f977a">operator&gt;&gt; </a>(QDataStream &amp; stream, <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; t);
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 <span class="keyword">namespace </span>qx {
<a name="l00066"></a>00066 <span class="keyword">namespace </span>dao {
<a name="l00067"></a>00067 
<a name="l00068"></a>00068 <span class="keyword">namespace </span>detail {
<a name="l00069"></a>00069 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_IsDirty;
<a name="l00070"></a>00070 } <span class="comment">// namespace detail</span>
<a name="l00071"></a>00071 
<a name="l00137"></a>00137 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00138"></a><a class="code" href="classqx_1_1dao_1_1ptr.html">00138</a> <span class="keyword">class </span><a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">ptr</a>
<a name="l00139"></a>00139 {
<a name="l00140"></a>00140 
<a name="l00141"></a>00141    <span class="keyword">template</span> &lt;<span class="keyword">class</span> U&gt; <span class="keyword">friend</span> QDataStream &amp; ::operator&lt;&lt; (QDataStream &amp; stream, const qx::dao::ptr&lt;U&gt; &amp; t);
<a name="l00142"></a>00142    <span class="keyword">template</span> &lt;<span class="keyword">class</span> U&gt; <span class="keyword">friend</span> QDataStream &amp; ::operator&gt;&gt; (QDataStream &amp; stream, <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;U&gt;</a> &amp; t);
<a name="l00143"></a>00143 
<a name="l00144"></a>00144 <span class="keyword">private</span>:
<a name="l00145"></a>00145 
<a name="l00146"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c">00146</a>    QSharedPointer&lt;T&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>;       
<a name="l00147"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4">00147</a>    QSharedPointer&lt;T&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>;   
<a name="l00148"></a>00148 
<a name="l00149"></a>00149 <span class="keyword">public</span>:
<a name="l00150"></a>00150 
<a name="l00151"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a0b5bcd0fedbc628ae37b1dff6315321d">00151</a>    <a class="code" href="classqx_1_1dao_1_1ptr.html#a0b5bcd0fedbc628ae37b1dff6315321d">ptr</a>()                                                                                                             { ; }
<a name="l00152"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a55fac971a2578ec258592684f5c51a27">00152</a>    <span class="keyword">explicit</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a55fac971a2578ec258592684f5c51a27">ptr</a>(T * <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">ptr</a>) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(ptr)                                                                              { ; }
<a name="l00153"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a65567dd5de626ce9e0b863535caef4f9">00153</a>    <span class="keyword">explicit</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a65567dd5de626ce9e0b863535caef4f9">ptr</a>(T * <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">ptr</a>, T * original) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(ptr), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>(original)                                         { ; }
<a name="l00154"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a8d202b3d00b8b1b2363cb5287e51bc4c">00154</a>    <a class="code" href="classqx_1_1dao_1_1ptr.html#a8d202b3d00b8b1b2363cb5287e51bc4c">ptr</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; other) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(other.<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>(other.<a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>)                       { ; }
<a name="l00155"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#aafa6c9a418f0ecdcb8444f9e64b71f1b">00155</a>    <a class="code" href="classqx_1_1dao_1_1ptr.html#aafa6c9a418f0ecdcb8444f9e64b71f1b">ptr</a>(<span class="keyword">const</span> QSharedPointer&lt;T&gt; &amp; other) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(other)                                                             { ; }
<a name="l00156"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#ab197ecd47f0ae2afc325dcefa92e52c7">00156</a>    <a class="code" href="classqx_1_1dao_1_1ptr.html#ab197ecd47f0ae2afc325dcefa92e52c7">ptr</a>(<span class="keyword">const</span> QSharedPointer&lt;T&gt; &amp; other, <span class="keyword">const</span> QSharedPointer&lt;T&gt; &amp; original) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(other), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>(original)  { ; }
<a name="l00157"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a0124dc0c69b80b6226ef3b002141dbf6">00157</a>    <a class="code" href="classqx_1_1dao_1_1ptr.html#a0124dc0c69b80b6226ef3b002141dbf6">ptr</a>(<span class="keyword">const</span> QWeakPointer&lt;T&gt; &amp; other) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(other)                                                               { ; }
<a name="l00158"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#afc14eee944d27d2a847e34e8b3488515">00158</a>    <a class="code" href="classqx_1_1dao_1_1ptr.html#afc14eee944d27d2a847e34e8b3488515">ptr</a>(<span class="keyword">const</span> QWeakPointer&lt;T&gt; &amp; other, <span class="keyword">const</span> QWeakPointer&lt;T&gt; &amp; original) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(other), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>(original)      { ; }
<a name="l00159"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a2e02997d9eef50ca5e5999f5c873c0ef">00159</a>    <span class="keyword">virtual</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a2e02997d9eef50ca5e5999f5c873c0ef">~ptr</a>()                                                                                                    { ; }
<a name="l00160"></a>00160 
<a name="l00161"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a8e45ad23ef6312c54f2eef108af7a74d">00161</a>    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> Deleter&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html#a8e45ad23ef6312c54f2eef108af7a74d">ptr</a>(T * <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">ptr</a>, Deleter deleter) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(ptr, deleter)                                       { ; }
<a name="l00162"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a0954c2b5b20c9e909de43dc32cf83ec0">00162</a>    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> Deleter&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html#a0954c2b5b20c9e909de43dc32cf83ec0">ptr</a>(T * <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">ptr</a>, T * original, Deleter deleter) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(ptr, deleter), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>(original)  { ; }
<a name="l00163"></a>00163 
<a name="l00164"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#af9c11db20181ed1d51d98c9e411519c8">00164</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html#af9c11db20181ed1d51d98c9e411519c8">ptr</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a> &amp; other) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(qSharedPointerCast&lt;T&gt;(other.<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>)), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>(qSharedPointerCast&lt;T&gt;(other.<a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>))                                                { ; }
<a name="l00165"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a5386ba6fb4399d673e938c9c9a568646">00165</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html#a5386ba6fb4399d673e938c9c9a568646">ptr</a>(<span class="keyword">const</span> QSharedPointer&lt;X&gt; &amp; other) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(qSharedPointerCast&lt;T&gt;(other))                                                                                                             { ; }
<a name="l00166"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a33d9c2a5bdae3955e0463005cf73c4e0">00166</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html#a33d9c2a5bdae3955e0463005cf73c4e0">ptr</a>(<span class="keyword">const</span> QSharedPointer&lt;X&gt; &amp; other, <span class="keyword">const</span> QSharedPointer&lt;T&gt; &amp; original) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(qSharedPointerCast&lt;T&gt;(other)), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>(qSharedPointerCast&lt;T&gt;(original))                           { ; }
<a name="l00167"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a7d08b1b7ba36b8a3394a3cdf600413d8">00167</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html#a7d08b1b7ba36b8a3394a3cdf600413d8">ptr</a>(<span class="keyword">const</span> QWeakPointer&lt;X&gt; &amp; other) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(qSharedPointerCast&lt;T&gt;(other.toStrongRef()))                                                                                                 { ; }
<a name="l00168"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#adb44fc3ccae1921e219f72e15e21a812">00168</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html#adb44fc3ccae1921e219f72e15e21a812">ptr</a>(<span class="keyword">const</span> QWeakPointer&lt;X&gt; &amp; other, <span class="keyword">const</span> QWeakPointer&lt;X&gt; &amp; original) : <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>(qSharedPointerCast&lt;T&gt;(other.toStrongRef())), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>(qSharedPointerCast&lt;T&gt;(original.toStrongRef()))   { ; }
<a name="l00169"></a>00169 
<a name="l00170"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a7ae7e3b539f69cc00c1e482154c5122c">00170</a>    <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html#a7ae7e3b539f69cc00c1e482154c5122c">operator=</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; other)     { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a> = other.<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>; <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a> = other.<a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>; <span class="keywordflow">return</span> (* <span class="keyword">this</span>); }
<a name="l00171"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#ae3da92cc62c8f8bbf2aeba401b5f5fed">00171</a>    <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html#ae3da92cc62c8f8bbf2aeba401b5f5fed">operator=</a>(<span class="keyword">const</span> QSharedPointer&lt;T&gt; &amp; other)   { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a> = other; <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.clear(); <span class="keywordflow">return</span> (* <span class="keyword">this</span>); }
<a name="l00172"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a1cdb1d25db2dd0f323749d81283c9d4b">00172</a>    <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html#a1cdb1d25db2dd0f323749d81283c9d4b">operator=</a>(<span class="keyword">const</span> QWeakPointer&lt;T&gt; &amp; other)     { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a> = other; <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.clear(); <span class="keywordflow">return</span> (* <span class="keyword">this</span>); }
<a name="l00173"></a>00173 
<a name="l00174"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a01b752b850a30045bd9e281d258fad86">00174</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html#a01b752b850a30045bd9e281d258fad86">operator=</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a> &amp; other)    { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a> = qSharedPointerCast&lt;T&gt;(other.<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>); <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a> = qSharedPointerCast&lt;T&gt;(other.<a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>); <span class="keywordflow">return</span> (* <span class="keyword">this</span>); }
<a name="l00175"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a7a308169ed717178d9d0e1ffa21e0812">00175</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html#a7a308169ed717178d9d0e1ffa21e0812">operator=</a>(<span class="keyword">const</span> QSharedPointer&lt;X&gt; &amp; other)  { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a> = qSharedPointerCast&lt;T&gt;(other); <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.clear(); <span class="keywordflow">return</span> (* <span class="keyword">this</span>); }
<a name="l00176"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a96aeb680b9107afd712c4e9f56ab59eb">00176</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html#a96aeb680b9107afd712c4e9f56ab59eb">operator=</a>(<span class="keyword">const</span> QWeakPointer&lt;X&gt; &amp; other)    { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a> = qSharedPointerCast&lt;T&gt;(other.toStrongRef()); <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.clear(); <span class="keywordflow">return</span> (* <span class="keyword">this</span>); }
<a name="l00177"></a>00177 
<a name="l00178"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#ad1f8373e084bac2992c70e89ed825e88">00178</a>    <span class="keyword">inline</span> T * <span class="keyword">get</span>() <span class="keyword">const</span>                                      { <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.data(); }
<a name="l00179"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a448d55751394d973cdc5eac0d8a20f5f">00179</a>    <span class="keyword">inline</span> T * <a class="code" href="classqx_1_1dao_1_1ptr.html#a448d55751394d973cdc5eac0d8a20f5f">getOriginal</a>()<span class="keyword"> const                              </span>{ <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.data(); }
<a name="l00180"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a0443a498bbd7d7a2fbd8d4c2c67f5660">00180</a>    <span class="keyword">inline</span> T * <a class="code" href="classqx_1_1dao_1_1ptr.html#a0443a498bbd7d7a2fbd8d4c2c67f5660">data</a>()<span class="keyword"> const                                     </span>{ <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.data(); }
<a name="l00181"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#aece669c8d5443bd8c0719c7b3be56821">00181</a>    <span class="keyword">inline</span> T * <a class="code" href="classqx_1_1dao_1_1ptr.html#aece669c8d5443bd8c0719c7b3be56821">dataOriginal</a>()<span class="keyword"> const                             </span>{ <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.data(); }
<a name="l00182"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a3a961ee0da053e378a8af2265c5a0c98">00182</a>    <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a3a961ee0da053e378a8af2265c5a0c98">isNull</a>()<span class="keyword"> const                                  </span>{ <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.isNull(); }
<a name="l00183"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a311333a4a3b8887a4b5151408f1c745a">00183</a>    <span class="keyword">inline</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a311333a4a3b8887a4b5151408f1c745a">operator bool</a>()<span class="keyword"> const                                </span>{ <span class="keywordflow">return</span> (! <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.isNull()); }
<a name="l00184"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#af29c34ee5b721260228831d613ac0437">00184</a>    <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#af29c34ee5b721260228831d613ac0437">operator!</a>()<span class="keyword"> const                               </span>{ <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.isNull(); }
<a name="l00185"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#adb92ed2a4b877239a5e5af27df7028e7">00185</a>    <span class="keyword">inline</span> T &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html#adb92ed2a4b877239a5e5af27df7028e7">operator*</a>()<span class="keyword"> const                                </span>{ <span class="keywordflow">return</span> (* <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.data()); }
<a name="l00186"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a35b089ca2e3d5edfd7557c501ff0b42a">00186</a>    <span class="keyword">inline</span> T * <a class="code" href="classqx_1_1dao_1_1ptr.html#a35b089ca2e3d5edfd7557c501ff0b42a">operator-&gt;</a>()<span class="keyword"> const                               </span>{ <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.data(); }
<a name="l00187"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a4eeddaf91d206c1711d4e09ed458a23d">00187</a>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a4eeddaf91d206c1711d4e09ed458a23d">clear</a>()                                         { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.clear(); <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.clear(); }
<a name="l00188"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a24e9d83338d32f9e110c3054a5cf18ae">00188</a>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a24e9d83338d32f9e110c3054a5cf18ae">reset</a>()                                         { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.clear(); <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.clear(); }
<a name="l00189"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#addf75188c323dc94f7e9e433b93f3257">00189</a>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#addf75188c323dc94f7e9e433b93f3257">reset</a>(<span class="keyword">const</span> QSharedPointer&lt;T&gt; &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">ptr</a>)            { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a> = <a class="code" href="classqx_1_1dao_1_1ptr.html#a0b5bcd0fedbc628ae37b1dff6315321d">ptr</a>; <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.clear(); }
<a name="l00190"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a86f18a92d2c6e03d0ac7b28bac15178d">00190</a>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a86f18a92d2c6e03d0ac7b28bac15178d">resetOriginal</a>(<span class="keyword">const</span> QSharedPointer&lt;T&gt; &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">ptr</a>)    { <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a> = <a class="code" href="classqx_1_1dao_1_1ptr.html#a0b5bcd0fedbc628ae37b1dff6315321d">ptr</a>; }
<a name="l00191"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a72aef56f448e58cd3fece9783052c78e">00191</a>    <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a72aef56f448e58cd3fece9783052c78e">isDirty</a>()<span class="keyword"> const                                 </span>{ QStringList lstDiff; <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a72aef56f448e58cd3fece9783052c78e">isDirty</a>(lstDiff); }
<a name="l00192"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a80b0201d06ec9f2b36a9fa3b06053bf8">00192</a>    <span class="keyword">inline</span> QSharedPointer&lt;T&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html#a80b0201d06ec9f2b36a9fa3b06053bf8">toQtSharedPointer</a>()<span class="keyword"> const          </span>{ <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>; }
<a name="l00193"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a4132ee2ecfa45a910b2d09cf1d510476">00193</a>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a4132ee2ecfa45a910b2d09cf1d510476">saveToOriginal</a>()                                { <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.clear(); <span class="keywordflow">if</span> (<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>) { <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a> = <a class="code" href="group___qx_serialize.html#ga2a480297e6901b648482cc11524fdca7" title="qx::clone_to_qt_shared_ptr(const T &amp; obj) : return a Qt smart-pointer (QSharedPointer&lt;T&gt;) of a new in...">qx::clone_to_qt_shared_ptr</a>(* <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>); } }
<a name="l00194"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a97f4de6f7a6b7c7c0650bb6dff1051f6">00194</a>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a97f4de6f7a6b7c7c0650bb6dff1051f6">restoreFromOriginal</a>()                           { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.clear(); <span class="keywordflow">if</span> (<a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>) { <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a> = <a class="code" href="group___qx_serialize.html#ga2a480297e6901b648482cc11524fdca7" title="qx::clone_to_qt_shared_ptr(const T &amp; obj) : return a Qt smart-pointer (QSharedPointer&lt;T&gt;) of a new in...">qx::clone_to_qt_shared_ptr</a>(* <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>); } }
<a name="l00195"></a>00195 
<a name="l00196"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#a5098b8bc5fe865c0de0c527c5c47d588">00196</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a> <a class="code" href="classqx_1_1dao_1_1ptr.html#a5098b8bc5fe865c0de0c527c5c47d588">staticCast</a>()<span class="keyword"> const       </span>{ <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a>(<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.template staticCast&lt;X&gt;(), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.template staticCast&lt;X&gt;()); }
<a name="l00197"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#adf9c312a20e4ea9e1bcc7a6e6e0d0b29">00197</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a> <a class="code" href="classqx_1_1dao_1_1ptr.html#adf9c312a20e4ea9e1bcc7a6e6e0d0b29">dynamicCast</a>()<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a>(<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.template dynamicCast&lt;X&gt;(), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.template dynamicCast&lt;X&gt;()); }
<a name="l00198"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#aa26f7b06ac00a3abd7a8c9165b198476">00198</a>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> X&gt; <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a> <a class="code" href="classqx_1_1dao_1_1ptr.html#aa26f7b06ac00a3abd7a8c9165b198476">constCast</a>()<span class="keyword"> const        </span>{ <span class="keywordflow">return</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a>(<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.template constCast&lt;X&gt;(), <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.template constCast&lt;X&gt;()); }
<a name="l00199"></a>00199 
<a name="l00200"></a><a class="code" href="classqx_1_1dao_1_1ptr.html#aa2384e3b0a31197b6b8bd4bf4807e98a">00200</a>    <span class="keywordtype">bool</span> <a class="code" href="classqx_1_1dao_1_1ptr.html#a72aef56f448e58cd3fece9783052c78e">isDirty</a>(QStringList &amp; lstDiff)<span class="keyword"> const</span>
<a name="l00201"></a>00201 <span class="keyword">   </span>{
<a name="l00202"></a>00202       lstDiff.clear();
<a name="l00203"></a>00203       <span class="keywordflow">if</span> (<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>.isNull() || <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>.isNull()) { lstDiff.append(<span class="stringliteral">&quot;*&quot;</span>); <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00204"></a>00204       <span class="keywordflow">if</span> (<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a> == <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>) { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00205"></a>00205       <a class="code" href="structqx_1_1dao_1_1detail_1_1_qx_dao___is_dirty.html">qx::dao::detail::QxDao_IsDirty&lt;T&gt;::compare</a>((* <a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>), (* <a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>), lstDiff);
<a name="l00206"></a>00206       <span class="keywordflow">return</span> (! lstDiff.isEmpty());
<a name="l00207"></a>00207    }
<a name="l00208"></a>00208 
<a name="l00209"></a>00209 };
<a name="l00210"></a>00210 
<a name="l00211"></a>00211 } <span class="comment">// namespace dao</span>
<a name="l00212"></a>00212 } <span class="comment">// namespace qx</span>
<a name="l00213"></a>00213 
<a name="l00214"></a><a class="code" href="_qx_dao_pointer_8h.html#a0af5e0c52a475d38f54b777961a1a4a5">00214</a> <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, <span class="keyword">class</span> X&gt; <span class="keywordtype">bool</span> <a class="code" href="_qx_dao_pointer_8h.html#a0af5e0c52a475d38f54b777961a1a4a5">operator==</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; ptr1, <span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a> &amp; ptr2)   { <span class="keywordflow">return</span> (ptr1.<a class="code" href="classqx_1_1dao_1_1ptr.html#a80b0201d06ec9f2b36a9fa3b06053bf8">toQtSharedPointer</a>() == ptr2.<a class="code" href="classqx_1_1dao_1_1ptr.html#a80b0201d06ec9f2b36a9fa3b06053bf8">toQtSharedPointer</a>()); }
<a name="l00215"></a><a class="code" href="_qx_dao_pointer_8h.html#aade977f33aac9c8bc22262a102614234">00215</a> <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, <span class="keyword">class</span> X&gt; <span class="keywordtype">bool</span> <a class="code" href="_qx_dao_pointer_8h.html#aade977f33aac9c8bc22262a102614234">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; ptr1, <span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a> &amp; ptr2)   { <span class="keywordflow">return</span> (ptr1.<a class="code" href="classqx_1_1dao_1_1ptr.html#a80b0201d06ec9f2b36a9fa3b06053bf8">toQtSharedPointer</a>() != ptr2.<a class="code" href="classqx_1_1dao_1_1ptr.html#a80b0201d06ec9f2b36a9fa3b06053bf8">toQtSharedPointer</a>()); }
<a name="l00216"></a><a class="code" href="_qx_dao_pointer_8h.html#a4333adfcedc6869e73fcd9025af83deb">00216</a> <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, <span class="keyword">class</span> X&gt; <span class="keywordtype">bool</span> <a class="code" href="_qx_dao_pointer_8h.html#a0af5e0c52a475d38f54b777961a1a4a5">operator==</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; ptr1, <span class="keyword">const</span> X * ptr2)                 { <span class="keywordflow">return</span> (ptr1.<a class="code" href="classqx_1_1dao_1_1ptr.html#a80b0201d06ec9f2b36a9fa3b06053bf8">toQtSharedPointer</a>() == ptr2); }
<a name="l00217"></a><a class="code" href="_qx_dao_pointer_8h.html#ac5ba9b96bce59996ba4e5d7f8da0fe62">00217</a> <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, <span class="keyword">class</span> X&gt; <span class="keywordtype">bool</span> <a class="code" href="_qx_dao_pointer_8h.html#aade977f33aac9c8bc22262a102614234">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; ptr1, <span class="keyword">const</span> X * ptr2)                 { <span class="keywordflow">return</span> (ptr1.<a class="code" href="classqx_1_1dao_1_1ptr.html#a80b0201d06ec9f2b36a9fa3b06053bf8">toQtSharedPointer</a>() != ptr2); }
<a name="l00218"></a><a class="code" href="_qx_dao_pointer_8h.html#a6506a49e16ffb1a2b908ab538173c51b">00218</a> <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, <span class="keyword">class</span> X&gt; <span class="keywordtype">bool</span> <a class="code" href="_qx_dao_pointer_8h.html#a0af5e0c52a475d38f54b777961a1a4a5">operator==</a>(<span class="keyword">const</span> T * ptr1, <span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a> &amp; ptr2)                 { <span class="keywordflow">return</span> (ptr1 == ptr2.<a class="code" href="classqx_1_1dao_1_1ptr.html#a80b0201d06ec9f2b36a9fa3b06053bf8">toQtSharedPointer</a>()); }
<a name="l00219"></a><a class="code" href="_qx_dao_pointer_8h.html#a4824672e3d85e02bb45bd101d910fe50">00219</a> <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, <span class="keyword">class</span> X&gt; <span class="keywordtype">bool</span> <a class="code" href="_qx_dao_pointer_8h.html#aade977f33aac9c8bc22262a102614234">operator!=</a>(<span class="keyword">const</span> T * ptr1, <span class="keyword">const</span> <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;X&gt;</a> &amp; ptr2)                 { <span class="keywordflow">return</span> (ptr1 != ptr2.<a class="code" href="classqx_1_1dao_1_1ptr.html#a80b0201d06ec9f2b36a9fa3b06053bf8">toQtSharedPointer</a>()); }
<a name="l00220"></a>00220 
<a name="l00221"></a>00221 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00222"></a><a class="code" href="_qx_dao_pointer_8h.html#a7dc138582f6e731c34dd23a892d6ee73">00222</a> QDataStream &amp; operator&lt;&lt; (QDataStream &amp; stream, const qx::dao::ptr&lt;T&gt; &amp; t)
<a name="l00223"></a>00223 {
<a name="l00224"></a>00224    stream &lt;&lt; t.m_pWork;
<a name="l00225"></a>00225    stream &lt;&lt; t.m_pOriginal;
<a name="l00226"></a>00226    <span class="keywordflow">return</span> stream;
<a name="l00227"></a>00227 }
<a name="l00228"></a>00228 
<a name="l00229"></a>00229 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00230"></a><a class="code" href="_qx_dao_pointer_8h.html#ad0804be98f952998027b3e644ed2bbb3">00230</a> QDataStream &amp; <a class="code" href="_qx_bool_8h.html#a01172f4bf3386f123bdcfd8b260f977a">operator&gt;&gt; </a>(QDataStream &amp; stream, <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; t)
<a name="l00231"></a>00231 {
<a name="l00232"></a>00232    stream &gt;&gt; t.<a class="code" href="classqx_1_1dao_1_1ptr.html#acc040ff7cdba075521ffc00ba3ad6e3c" title="Default pointer =&gt; user works with this pointer.">m_pWork</a>;
<a name="l00233"></a>00233    stream &gt;&gt; t.<a class="code" href="classqx_1_1dao_1_1ptr.html#abcbe13c61bc78664938be98d660e87e4" title="Keep original pointer containing all values from database.">m_pOriginal</a>;
<a name="l00234"></a>00234    <span class="keywordflow">return</span> stream;
<a name="l00235"></a>00235 }
<a name="l00236"></a>00236 
<a name="l00237"></a>00237 <span class="preprocessor">#endif // _QX_DAO_POINTER_H_</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_qx_dao_pointer_8h.html">QxDaoPointer.h</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Sun Dec 11 2016 13:41:03 for QxOrm by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
